<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距</title>
 <style>
        #d{
            height: 500px;
            width: 500px;
            border: 1px solid black;
        }
        #d1{
            width: 200px;
            height: 200px;
            background: #FC96B2;
            margin: 30px;
        }
        #d2{
            width: 200px;
            height: 200px;
            background: green;
        }
    </style>
</head>
<body>
    <div id="d">
        <div id="d1">
            d1
        </div>
        <div id="d2">
            d2
        </div>
    </div>
</body>
</html>